home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 25 / AMIGAplus Sonderheft 25 (2000)(Falke)(DE)(Track 1 of 4)[!].iso / Updates / PowerPC / pdflib / bind / perl / readme.txt < prev    next >
Text File  |  2000-05-16  |  3KB  |  84 lines

  1. Notes on the PDFlib Perl binding:
  2.  
  3. Perl versions 5.005_54 and newer
  4. ================================
  5.  
  6. Sometime after Perl 5.005_03 (most probably 5.005_54 -- I don't know the
  7. exact version number) an incompatible change was introduced in the Perl
  8. headers and source code which isn't yet reflected in the SWIG-generated
  9. C wrapper file.
  10.  
  11. If you use a version of Perl newer thant 5.005_03 and experience lots 
  12. of compiler errors, try adding the following lines at the beginning of
  13. pdflib_pl.c:
  14.  
  15. #define sv_yes          PL_sv_yes
  16. #define na              PL_na
  17. #define sv_undef        PL_sv_undef
  18.  
  19.  
  20. ActivePerl on Win32
  21. ===================
  22.  
  23. Given the blazing speed of Perl development, we had a
  24. hard time making the PDFlib Perl extension module work on both
  25. Unix and Win32. We finally came up with the following solution,
  26. which has (on Windows NT 4.0) been tested with
  27.  
  28. - MS Visual C++ 6.0
  29. - ActiveState Perl build 517, based on Perl 5.005_03
  30.  
  31. Since the whole topic is heavily in motion, our solution may
  32. break with other versions or compilers. Due to the local pathnames
  33. involved, it doesn't hurt to note what's going on since many
  34. people will have to change some settings.
  35.  
  36. You may find the following notes useful when trying to make other
  37. combinations work:
  38.  
  39. - We must use SWIG 1.2 (currently alpha) because older versions can't
  40.   deal with the macro definitions used in pdflib.h. Don't try to
  41.   use older versions of SWIG -- it doesn't solve any problems you
  42.   may have!
  43.  
  44. - The following have already been taken care of in the SWIG input
  45.   file pdflib.i:
  46.   - Both the Perl and Microsoft include files redefine setjmp/longjmp
  47.     with macro definitions. We try to work around this mess by adding
  48.     another layer of macro mess.
  49.  
  50. - The following have already been taken care of in the VC++ project file:
  51.   - Add PERL_OBJECT to the list of pre-defined names since ActiveState
  52.     uses the C++ object wrapper for the Perl interpreter.
  53.   - Run the compiler in C++ mode (required by ActiveState). There
  54.     doesn't seem to be a GUI option for C++ mode, but the compiler switch
  55.     /Tp works.
  56.   - Add the equivalent of the following to the list of pre-defined names:
  57.     #define CPerl CPerlObj
  58.   - Add the following directories to the include path, where <AP>
  59.     denotes the ActivePerl source directory:
  60.     <AP>
  61.     <AP>\win32
  62.     <AP>\win32\include
  63.  
  64. - pdflib_pl.c as contained in the distribution was hacked after
  65.   being generated by SWIG:
  66.   - Change the following line in pdflib_pl.c:
  67.       SWIGEXPORT(void,boot_pdflib)(CPerl *, CV *cv);
  68.     to:
  69.       SWIGEXPORT(void,boot_pdflib)(CV *cv, CPerlObj *pPerl);
  70.  
  71.     Make sure to change this line in the PERL_OBJECT branch of the
  72.     respective #ifdef.
  73.  
  74. - Prepare the ActiveState Perl sources:
  75.   - rename <AP>\win32\config_h.vc to config.h and copy it to <AP>.
  76.  
  77.  
  78. MacPerl
  79. =======
  80.  
  81. In order to build a PDFlib Perl extension on the Mac, the PDFlib shared
  82. library must be linked against a library named PerlStub which is supplied
  83. with the Perl source distribution.
  84.